{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/Contestant/contestant')}">参赛选手</a></li>
            <li class="layui-this">选手编辑</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div>
                    <form class="layui-form form-container" action="{:url('admin/Contestant/deleteimg')}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label">选手作品</label>
                            <div class="layui-input-block">
                                <table>
                                    <tr>
                                        {php}
                                        $imgs = explode(",",$user['playerPic']);
                                        for($i = 0; $i < count($imgs); $i++){
                                        {/php}
                                        <td style="width: 200px;height: 200px;">
                                            <img style="width: 200px;height: 200px;margin: 0px 10px 10px 0px"  id="imgss" src="http://sml.lfmall.net{$imgs[$i]}" />
                                            <div style="margin-left: 60px">
                                                <input name="userid" type="hidden" value="{$user.id}" />
                                                <input name="imgurl" type="hidden" value="{$imgs[$i]}" />
                                                <button  lay-submit lay-filter="*" style="width: 70px;height: 30px">删除</button>
                                            </div>
                                        </td>

                                        {php}
                                        }
                                        {/php}
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </form>
                </div>
                <form class="layui-form form-container" action="{:url('admin/Contestant/editTicket')}" method="post">

                    <div class="layui-form-item">
                        <label class="layui-form-label">选手姓名</label>
                        <div class="layui-input-block">
                            <input type="text" name="playerName" value="{$user.playerName}" required  lay-verify="required" placeholder="请输入选手名" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">选手电话</label>
                        <div class="layui-input-block">
                            <input type="text" name="playerMobile" value="{$user.playerMobile}" placeholder="请输入选手电话" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$user.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                 </form>
            </div>
        </div>
    </div>
</div>
{/block}